class Article < ActiveRecord::Base
  validates_presence_of :title, :author, :body
  validates_uniqueness_of :title
  validates_format_of :image_url,
                      :with     => %r{\.(gif|jpg|png)$}i,
                      :message  => "must be a url for a GIF, JPG, or PNG"
  @news = "News"
  
  def self.find_articles_to_be_posted
    find(:all, :order => "created_at")
  end
  
end
